Small fix to the error-return path after calling
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 17 Dec 2005 01:11:54 +0000 (02:11 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Sat, 17 Dec 2005 01:11:54 +0000 (02:11 +0100)
__copy_to_user in the swiotlb sync function. We cannot
immediately exit the sync function as there may be tail work
to do (e.g., kunmap_atomic). In fact, doing nothing is the
right thing to do and is sufficient to avoid compiler
warnings about not checking the __copy_to_user return value.

Signed-off-by: Keir Fraser <keir@xensource.com>
linux-2.6-xen-sparse/arch/xen/i386/kernel/swiotlb.c

index bf9c215a3166f9abd97751619ffc9cf09c68a6a1..def082cba2d9f874d8d5df42cb18675224c61690 100644 (file)
@@ -223,7 +223,7 @@ __sync_single(struct phys_addr buffer, char *dma_addr, size_t size, int dir)
                        host = kmp + buffer.offset;
                        if (dir == DMA_FROM_DEVICE) {
                                if (__copy_to_user(host, dev, bytes))
-                                       return; /* inaccessible */
+                                       /* inaccessible */;
                        } else
                                memcpy(dev, host, bytes);
                        kunmap_atomic(kmp, KM_SWIOTLB);
@@ -236,7 +236,7 @@ __sync_single(struct phys_addr buffer, char *dma_addr, size_t size, int dir)
                        page_to_pseudophys(buffer.page)) + buffer.offset;
                if (dir == DMA_FROM_DEVICE) {
                        if (__copy_to_user(host, dma_addr, size))
-                               return; /* inaccessible */
+                               /* inaccessible */;
                } else if (dir == DMA_TO_DEVICE)
                        memcpy(dma_addr, host, size);
        }